/********************************************************************
	File		: Sprite.h
	Created		: 2011-2-21	23:02
	Author		: Wjl

	Desc		: This file is part of omiga 2d engine.
*********************************************************************/

#ifndef Sprite_H__
#define Sprite_H__

#include <string>
#include <vector>
#include "VisCommon.h"

namespace Vis
{
	class Texture;
	class Sprite
	{
	public:

		Sprite();
		Sprite(const Sprite& _other);
		virtual		~Sprite();

		virtual void		Load();
		virtual void		Release();

		virtual void		Display();

	protected:

		std::string		m_strName;					// sprite name
		int				m_iSpriteID;

		// Frame and size
		// Core::Recti	m_iFrame;
		// Core::Vec2D	m_vCenter;

		float			m_fRotX, m_fRotY, m_fRotZ;
		float			m_fScaleX, m_fScaleY;

		SPRITE_STATUS	m_eStatus;
		float			m_fAlpha;
		R2D_BLEND		m_eBlendMode;
		
		Sprite*			m_pParent;
		Sprite*			m_pRoot;

		std::vector<Sprite*>	m_Children;

		bool			m_bVisible;

		Texture*		m_pTexture;
	};
}

#endif // Sprite_H__